home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / ftn / tapeio.z / tapeio
Encoding:
Text File  |  1998-10-30  |  5.2 KB  |  133 lines

  1.  
  2.  
  3.  
  4. TTTTAAAAPPPPEEEEIIIIOOOO((((3333FFFF))))                                                          TTTTAAAAPPPPEEEEIIIIOOOO((((3333FFFF))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      tapeio: topen, tclose, tread, twrite, trewin, tskipf, tstate - FORTRAN
  10.      tape device specific I/O routines
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      iiiinnnntttteeeeggggeeeerrrr  ttttooooppppeeeennnn,,,, ttttcccclllloooosssseeee,,,, ttttrrrreeeeaaaadddd,,,, ttttwwwwrrrriiiitttteeee,,,, ttttrrrreeeewwwwiiiinnnn,,,, ttttsssskkkkiiiippppffff,,,, ttttssssttttaaaatttteeee
  14.      iiiinnnntttteeeeggggeeeerrrr  ttttlllluuuu
  15.      cccchhhhaaaarrrraaaacccctttteeeerrrr****((((****)))) bbbbuuuuffffffffeeeerrrr
  16.      cccchhhhaaaarrrraaaacccctttteeeerrrr****((((****)))) ddddeeeevvvvnnnnaaaammmm
  17.      llllooooggggiiiiccccaaaallll llllaaaabbbblllleeeedddd
  18.  
  19.      iiiieeeerrrrrrrroooorrrr ==== ttttooooppppeeeennnn((((ttttlllluuuu,,,, ddddeeeevvvvnnnnaaaammmm,,,, llllaaaabbbblllleeeedddd))))
  20.      iiiieeeerrrrrrrroooorrrr ==== ttttcccclllloooosssseeee((((ttttlllluuuu))))
  21.      nnnnbbbbyyyytttteeeessss ==== ttttrrrreeeeaaaadddd((((ttttlllluuuu,,,, bbbbuuuuffffffffeeeerrrr))))
  22.      nnnnbbbbyyyytttteeeessss ==== ttttwwwwrrrriiiitttteeee((((ttttlllluuuu,,,, bbbbuuuuffffffffeeeerrrr))))
  23.      iiiieeeerrrrrrrroooorrrr ==== ttttrrrreeeewwwwiiiinnnn ((((ttttlllluuuu))))
  24.      iiiieeeerrrrrrrroooorrrr ==== ttttsssskkkkiiiippppffff ((((ttttlllluuuu,,,, nnnnffffiiiilllleeeessss,,,, nnnnrrrreeeeccccssss))))
  25.  
  26.      iiiinnnntttteeeeggggeeeerrrr ffffiiiilllleeeennnnoooo,,,, rrrreeeeccccnnnnoooo,,,, eeeerrrrrrrr,,,, eeeeooooffff,,,, eeeeooootttt,,,, ttttccccssssrrrr
  27.      iiiieeeerrrrrrrroooorrrr ==== ttttssssttttaaaatttteeee ((((ttttlllluuuu,,,, ffffiiiilllleeeennnnoooo,,,, rrrreeeeccccnnnnoooo,,,, eeeerrrrrrrr,,,, eeeeooooffff,,,, eeeeooootttt,,,, ttttccccssssrrrr))))
  28.  
  29. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  30.      _t_a_p_e_i_o is the general name for the set of I/O functions that operate on a
  31.      tape device.  _t_o_p_e_n, _t_c_l_o_s_e, _t_r_e_w_i_n, _t_s_k_i_p_f, and _t_s_t_a_t_e return -1 on
  32.      error, 0 if successful. _t_r_e_a_d and _t_w_r_i_t_e return -1 on error, the number
  33.      of bytes read (or written) on success.
  34.  
  35.      _t_o_p_e_n opens a tape unit for I/O.  _d_e_v_n_a_m is the name of the tape device.
  36.      _l_a_b_l_e_d should be .true. if the tape is labeled.  _t_l_u is set to the
  37.      logical unit number of the tape device used for subsequent calls.
  38.  
  39.      _t_c_l_o_s_e closes a tape unit previously opened by _t_o_p_e_n.
  40.  
  41.      _t_r_e_a_d reads from the tape device into _b_u_f_f_e_r.  _n_b_y_t_e_s is set to the
  42.      number of bytes actually read, or -1 for an error.  Zero (0) maybe
  43.      returned in an end-of-file or end-of-tape situation.
  44.  
  45.      _t_w_r_i_t_e writes to the tape device from _b_u_f_f_e_r.  _n_b_y_t_e_s is set to the
  46.      number of bytes actually written, or -1 for an error.
  47.  
  48.      _t_r_e_w_i_n rewinds the tape device.
  49.  
  50.      _t_s_k_i_p_f skips forward _n_f_i_l_e_s files and _n_r_e_c_s records.
  51.  
  52.      _t_s_t_a_t_e returns the status of the tape channel.  Upon successful
  53.      completion, 0 is returned and the following values will be set:
  54.  
  55.      fileno
  56.           current file number
  57.      recno
  58.           current record number
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. TTTTAAAAPPPPEEEEIIIIOOOO((((3333FFFF))))                                                          TTTTAAAAPPPPEEEEIIIIOOOO((((3333FFFF))))
  71.  
  72.  
  73.  
  74.      err  1 if there are errors, 0 if there are no errors
  75.      eof  1 if it is at end-of-file, 0 if not
  76.      eot  1 if it is at end-of-tape, 0 if not
  77.      tcsr the value of the drive status register, see mt_dsreg in
  78.           /usr/include/sys/mtio.h
  79.  
  80.  
  81. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  82.      mtio(7)
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.